/**
 * @file
 * @auth zhaojing
 * @date 2016/11/21
 */

import ajax from '../../../../grsc-base/util/ajax';

export default {

    /**
     * 账户明细列表
     * @param param
     * @returns {*}
     */
    financeDetailList(param = {}) {
        return ajax.get('/exchangeApi/asset/finance-detail', {
            data: param
        });
    },
    /**
     * 同步资产时获取地址值
     * @param param
     * @returns {*}
     */
    synAssetAddressValue(param = {}) {
        return ajax.get('/exchangeApi/coin/matchAsset', {
            data: param
        });
    },

    /**
     * coin地址列表
     * @param param
     * @returns {*}
     */
    coinAddressList(param = {}) {
        return ajax.get('exchangeApi/coin/transfer-out-address', {
            data: param
        });
    },

    /**
     * 添加果仁地址
     * @param param
     * @param header
     */
    coinAddressManAdd(param = {}, header = {}) {
        return ajax.post('/exchangeApi/coin/transfer-out-address', {
            data: param,
            header: header
        });
    },

    /**
     * coin充值历史记录
     * */
    depositCoinDetails(param = {}) {
        return ajax.get('/exchangeApi/coin/deposit-coin-details', {
            data: param
        })
    },

    /**
     * 果仁转出历史列表
     * @param param
     * @returns {*}
     */
    transferOutHistory(param = {}) {
        return ajax.get('/exchangeApi/coin/withdraw-coin-details', {
            data: param
        });
    },

    /**
     * GOP转出
     * @param param
     * @param header
     * @returns {*}
     */
    transferOut(param = {}, header = {}) {
        return ajax.post('/exchangeApi/coin/withdraw-coin', {
            data: param,
            header: header
        });
    },

    /**
     * 站内互转
     * @param param
     * @param header
     * @returns {*}
     */
    transferInner(param = {}, header = {}) {
        return ajax.post('/exchangeApi/coin/withdraw-coin-inner', {
            data: param,
            header: header
        });
    },


    /**
         *
         * 获取dfp
         * */

    getDfp() {
        return ajax.get('/exchangeApi/configSymbol-Operate/getAssetUSDPrice')
    },


    /**
     * 获取各个资产转出手续费
     *
     * */
    withdrawFee(param = {}) {
        return ajax.get('/exchangeApi/coin/withdraw-coinfee-query', {
            data: param
        })
    },


    /**
     * 查询某分叉币种是否可领取糖果
     * */

    forkReceive(param = {}) {
        return ajax.get('/exchangeApi/fork/fork-receive', {
            data: param
        })
    },

    /**
     * 领取糖果
     * */

    forkCheck(param = {}) {
        return ajax.get('/exchangeApi/fork/fork-check', {
            data: param
        })
    },

    /**
     * 兑换码 领取奖励
     * */
    receive(param = {}) {
        return ajax.get('/exchangeApi/redeem-activity/receive', {
            data: param
        })
    },


    /**
     * 获取开放充值的币种列表
     * */
    depositAssetList(param = {}) {
        return ajax.get('/exchangeApi/coin/deposit-coin-asset-list', {
            data: param
        })
    },


    /**
     * 获取开放转出的币种列表
     * */
    withdrawAssetList(param = {}) {
        return ajax.get('/exchangeApi/coin/withdraw-coin-asset-list', {
            data: param
        })
    },


    /**
     * 领取奖励
     */
    getPresned(param = {}, header = {}) {
        return ajax.get('/exchangeApi/recharge/doRecharge', {
            data: param,
            header: header
        });
    },



    /**
     * =======================充值转出改版=========================
     * */

    /**
     * 钱包管理——地址列表
     * @param assetCode pageSize pageNo
     * @return addressid  assetCode address memo updateDate
     */
    transferOutAddressQuery(param = {}) {
        return ajax.get('/exchangeApi/coin/transfer-out-address-query', {
            data: param
        })
    },
    /**
         * 备用列表
         */
    // btcQuery(param = {}){
    //     return ajax.get('http://api.zbex3.com/data/v1/ticker',{
    //         data:param,
    //         dataType: "jsonp",
    //     })
    // },

    /**
     * 钱包管理--添加地址
     * @param assetCode、address、memo
     * */
    transferOutAddressAdd(param = {}) {
        return ajax.post('/exchangeApi/coin/transfer-out-address-add', {
            data: param
        })
    },

    /**
     * 钱包管理--删除地址
     * @param id
     * */
    transferOutAddressDelete(param = {}) {
        return ajax.post('/exchangeApi/coin/transfer-out-address-delete ', {
            data: param
        })
    },

    /**
  * 获取币种排名
  * @param param
  * @returns {*}
  */
    getConfigSymbolRank(param = {}) {
        return ajax.get('/exchangeApi/configSymbol-Operate/getConfigSymbolRank', {
            data: param
        });
    },
    /**
     * 获取币种图标等
     * @param param
     * @returns {*}
     */
    fundList(param = {}) {
        return ajax.get('http://fund.dfpchain.com:2019/api/fund/intro', {
            data: param
        });
    },

};